package com.huawei.cloud.phone.management.domain.phone;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.huawei.cloud.phone.management.common.utils.RandomStringUtils;
import lombok.Data;
import lombok.NoArgsConstructor;

@JsonInclude(JsonInclude.Include.NON_NULL)
@NoArgsConstructor
@Data
public class UserPhone {
    @JsonProperty("phone_id")
    private String phoneId;

    @JsonProperty("phone_name")
    private String phoneName;

    @JsonProperty("user_id")
    private String userId;

    public UserPhone(String userId) {
        this.userId = userId;
        this.phoneId = RandomStringUtils.randomUuidNoHyphens();
        this.phoneName = "name-" + RandomStringUtils.randomString(10);
    }
}
